﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Nivdal.AuxCode;
using System.Threading;
using System.Globalization;
namespace Nivdal
{
    public partial class GameManagersInstructions : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            OnlineUser ou = (OnlineUser)Session["User"];
            
            if (ou.UserAccessLevel != "2" && ou.UserAccessLevel != "3" && ou.UserAccessLevel != "4" && ou.UserAccessLevel != "5")
                Response.Redirect("~/TeamHomepage.aspx");
            else
            {
                TranslatorsPanel.Visible = (ou.UserAccessLevel == "3" || ou.UserAccessLevel == "5");
                ForumModeratorsPanel.Visible = (ou.UserAccessLevel == "2" || ou.UserAccessLevel == "4" || ou.UserAccessLevel == "5");

            }
        }


        protected override void InitializeCulture()
        {
            OnlineUser ou = (OnlineUser)Session["User"];
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(ou.UICulture);
            Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(ou.Culture);
        }
    }
}